var postData = require('../../data/posts-data.js')

Page({

  /**
   * 页面的初始数据
   */
  data: {},
  imgPath: "/images/...",
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function() {
    this.setData({
      post_content: postData.postList,
      num: 3
    })
  },
  onPostTap(event) {
    var postId = event.currentTarget.dataset.postid
    wx.navigateTo({
      url: 'post-detail/post-detail?id=' + postId
    })
  },
  onShowTap(event) {
    var postId = event.target.dataset.postid
    wx.navigateTo({
      url: 'post-detail/post-detail?id=' + postId
    })
  }
})